<template>
    <div class="topBox">
        <div class="pic">
            <img src="../assets/1.png" alt="">
        </div>
        <div class="caidan">
            <span class="qianggou" @click="handleClick">正在抢购</span>
            <span class="shangxin" @click="handle">上新预告</span>
        </div>
    </div>
</template>

<script>
import eventBus from '@/bus/eventBus';
import { user_tuan } from '../api';
export default {
    mounted(){
        user_tuan({params:{status:0}}).then((res)=>{
            this.tasklist = res.data.list
            // console.log(this.tasklist);
        }),
        user_tuan({params:{status:1}}).then((res)=>{
            this.tasklist2 = res.data.list
            // console.log(this.taklist2);
        })
    },
    methods:{
        handleClick(){
            eventBus.$emit('tranforData',this.tasklist)
        },
        handle(){
            eventBus.$emit('tranforData2',this.tasklist2)
        }
    },
};
</script>

<style scoped>
.topBox {
    width: 100%;
    height: 240px;
}
.pic {
    width: 100%;
    height: 200px;
}
img{
    width: 100%;
    height: 100%;
}
.caidan{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    font-size: 20px;
    margin-top: 10px;
}

</style>